<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            padding:0px;
            margin:0px;
        }
        .d1{
            width:300px;
            height: 300px;
            background:red;
            /*元素设置为绝对定位后，会悬浮在页面上方，脱离常规文档流*/
            position: absolute;
            top:20px;
            left:10px;

        }

    </style>
</head>
<body>
    <div class="d1"></div>

</body>
</html>